package com.hospital.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class Payment {
    @NotNull(message = "id不得为空")
    private int payment_id;

    @NotNull(message = "patient_id不得为空")
    private int patient_id;

    @NotNull(message = "payment_type不得为空")
    private int payment_type;

    @NotNull(message = "payment_way不得为空")
    private int payment_way;

    @NotNull(message = "payment_price不得为空")
    private double payment_price;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "支付时间不得为空")
    private Date payment_time;
}
